package constant.milk.cashbook.tip;

import java.util.ArrayList;

import android.content.Intent;
import android.os.Bundle;
import android.text.Html;
import android.widget.TextView;
import constant.milk.cashbook.R;
import constant.milk.cashbook.SuperActivity;
import constant.milk.cashbook.util.MilkUtil;

public class TipInfoActivity extends SuperActivity
{
	public static final String TIP_ID = "TIP_ID";
	
	private TextView tipTextView;
	
	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.tip_info_activity);
		
		setGoneTipButton();
		
		setFindViewId();
		setOnClick();
		setData();
	}

	@Override
	protected void setFindViewId()
	{
		tipTextView = (TextView) findViewById(R.id.tipInfoTextView);
	}

	@Override
	protected void setOnClick()
	{
	}

	@Override
	protected void setData()
	{
		TipMap map = new TipMap();
		
		Intent intent = getIntent();
		
		int tipFlag = intent.getIntExtra(TIP_ID, -1);
		
		if (tipFlag == -1)
		{
			tipTextView.setText("도움말을 찾을 수가 업습니다.");
		}
		else
		{
			setTitle(map.get(tipFlag));
			
			tipTextView.setText(Html.fromHtml(getTip(tipFlag)));
		}
		
	}
	
	/**
	 * 도움말의 내용을 번호 플래그에 맞게 가져와서 리턴한다.
	 * @param tipFlag
	 * @return
	 */
	private String getTip(int tipFlag)
	{
		String massage = "";
		
		switch (tipFlag)
		{
			case TipMap.TIP_MAIN:
			{
				massage = getResources().getString(R.string.tipMain);
				break;
			}
			case TipMap.TIP_INSERT:
			{
				massage = getResources().getString(R.string.tipInsert);
				break;
			}
			case TipMap.TIP_INSERT_OUT:
			{
				massage = getResources().getString(R.string.tipInsertOut);
				break;
			}
			case TipMap.TIP_INSERT_IN:
			{
				massage = getResources().getString(R.string.tipInsertIn);
				break;
			}
			case TipMap.TIP_INSERT_MOVE:
			{
				massage = getResources().getString(R.string.tipInsertMove);
				break;
			}
			case TipMap.TIP_INSERT_FAN:
			{
				massage = getResources().getString(R.string.tipInsertFan);
				break;
			}
			case TipMap.TIP_INSERT_GIFTCARD:
			{
				massage = getResources().getString(R.string.tipInsertGiftCard);
				break;
			}
			case TipMap.TIP_INSERT_RESULT:
			{
				massage = getResources().getString(R.string.tipInsertResult);
				break;
			}
			case TipMap.TIP_PHOTO:
			{
				massage = getResources().getString(R.string.tipPhoto);
				break;
			}
			case TipMap.TIP_SELECT:
			{
				massage = getResources().getString(R.string.tipSelect);
				break;
			}
			case TipMap.TIP_SELECT_LIST:
			{
				massage = getResources().getString(R.string.tipSelectList);
				break;
			}
			case TipMap.TIP_SELECT_INFO_OUT:
			{
				massage = getResources().getString(R.string.tipSelectInfoOut);
				break;
			}
			case TipMap.TIP_SELECT_INFO_IN:
			{
				massage = getResources().getString(R.string.tipSelectInfoIn);
				break;
			}
			case TipMap.TIP_SELECT_INFO_MOVE:
			{
				massage = getResources().getString(R.string.tipSelectInfoMove);
				break;
			}
			case TipMap.TIP_SELECT_INFO_FAN:
			{
				massage = getResources().getString(R.string.tipSelectInfoFan);
				break;
			}
			case TipMap.TIP_SELECT_INFO_GIFTCARD:
			{
				massage = getResources().getString(R.string.tipSelectInfoGiftCard);
				break;
			}
			case TipMap.TIP_SELECT_INFO_RESULT:
			{
				massage = getResources().getString(R.string.tipSelectInfoResult);
				break;
			}
			case TipMap.TIP_ASSET:
			{
				massage = getResources().getString(R.string.tipAsset);
				break;
			}
			case TipMap.TIP_ASSET_REALMONEY:
			{
				massage = getResources().getString(R.string.tipAssetRealMoney);
				break;
			}
			case TipMap.TIP_ASSET_REALMONEY_INSERT:
			{
				massage = getResources().getString(R.string.tipAssetRealMoneyInsert);
				break;
			}
			case TipMap.TIP_ASSET_REALMONEY_INFO:
			{
				massage = getResources().getString(R.string.tipAssetRealMoneyInfo);
				break;
			}
			case TipMap.TIP_ASSET_BANKBOOK:
			{
				massage = getResources().getString(R.string.tipAssetBankBook);
				break;
			}
			case TipMap.TIP_ASSET_BANKBOOK_INSERT:
			{
				massage = getResources().getString(R.string.tipAssetBankBookInsert);
				break;
			}
			case TipMap.TIP_ASSET_BANKBOOK_INFO:
			{
				massage = getResources().getString(R.string.tipAssetBankBookInfo);
				break;
			}
			case TipMap.TIP_ASSET_CHECKCARD:
			{
				massage = getResources().getString(R.string.tipAssetCheckCard);
				break;
			}
			case TipMap.TIP_ASSET_CHECKCARD_INSERT:
			{
				massage = getResources().getString(R.string.tipAssetCheckCardInsert);
				break;
			}
			case TipMap.TIP_ASSET_CHECKCARD_INFO:
			{
				massage = getResources().getString(R.string.tipAssetCheckCardInfo);
				break;
			}
			case TipMap.TIP_ASSET_CREDITCARD:
			{
				massage = getResources().getString(R.string.tipAssetCreditCard);
				break;
			}
			case TipMap.TIP_ASSET_CREDITCARD_INSERT:
			{
				massage = getResources().getString(R.string.tipAssetCreditCardInsert);
				break;
			}
			case TipMap.TIP_ASSET_CREDITCARD_INFO:
			{
				massage = getResources().getString(R.string.tipAssetCreditCardInfo);
				break;
			}
			case TipMap.TIP_ASSET_PHONE:
			{
				massage = getResources().getString(R.string.tipAssetPhone);
				break;
			}
			case TipMap.TIP_ASSET_PHONE_INESRT:
			{
				massage = getResources().getString(R.string.tipAssetPhoneInsert);
				break;
			}
			case TipMap.TIP_ASSET_PHONE_INFO:
			{
				massage = getResources().getString(R.string.tipAssetPhoneInfo);
				break;
			}
			case TipMap.TIP_ASSET_GIFTCARD:
			{
				massage = getResources().getString(R.string.tipAssetGiftCard);
				break;
			}
			case TipMap.TIP_ASSET_GIFTCARD_INSERT:
			{
				massage = getResources().getString(R.string.tipAssetGiftCardInsert);
				break;
			}
			case TipMap.TIP_ASSET_GIFTCARD_INFO:
			{
				massage = getResources().getString(R.string.tipAssetGiftCardInfo);
				break;
			}
			case TipMap.TIP_DATA:
			{
				massage = getResources().getString(R.string.tipData);
				break;
			}
			case TipMap.TIP_DATA_BACKUP:
			{
				massage = getResources().getString(R.string.tipDataBankUp);
				break;
			}
			case TipMap.TIP_DATA_ROLLBACK:
			{
				massage = getResources().getString(R.string.tipDataRollBank);
				break;
			}
			case TipMap.TIP_DATA_EXCEL:
			{
				massage = getResources().getString(R.string.tipDataExcel);
				break;
			}
			case TipMap.TIP_CATEGORY:
			{
				massage = getResources().getString(R.string.tipCategory);
				break;
			}
			case TipMap.TIP_CATEGORY_INSERT:
			{
				massage = getResources().getString(R.string.tipCategoryInsert);
				break;
			}
			case TipMap.TIP_CATEGORY_INFO:
			{
				massage = getResources().getString(R.string.tipCategoryInfo);
				break;
			}
			case TipMap.TIP_CATEGORY_SUB_INFO:
			{
				massage = getResources().getString(R.string.tipCategorySubInfo);
				break;
			}
			case TipMap.TIP_AUTO:
			{
				massage = getResources().getString(R.string.tipAuto);
				break;
			}
			case TipMap.TIP_AUTO_OUT:
			{
				massage = getResources().getString(R.string.tipAutoOut);
				break;
			}
			case TipMap.TIP_AUTO_OUT_INSERT:
			{
				massage = getResources().getString(R.string.tipAutoOutInsert);
				break;
			}
			case TipMap.TIP_AUTO_OUT_INFO:
			{
				massage = getResources().getString(R.string.tipAutoOutInfo);
				break;
			}
			case TipMap.TIP_AUTO_IN:
			{
				massage = getResources().getString(R.string.tipAutoIn);
				break;
			}
			case TipMap.TIP_AUTO_IN_INSERT:
			{
				massage = getResources().getString(R.string.tipAutoInInsert);
				break;
			}
			case TipMap.TIP_AUTO_IN_INFO:
			{
				massage = getResources().getString(R.string.tipAutoInInfo);
				break;
			}
			case TipMap.TIP_AUTO_MOVE:
			{
				massage = getResources().getString(R.string.tipAutoMove);
				break;
			}
			case TipMap.TIP_AUTO_MOVE_INSERT:
			{
				massage = getResources().getString(R.string.tipAutoMoveInsert);
				break;
			}
			case TipMap.TIP_AUTO_MOVE_INFO:
			{
				massage = getResources().getString(R.string.tipAutoMoveInfo);
				break;
			}
			case TipMap.TIP_AUTO_SMS:
			{
				massage = getResources().getString(R.string.tipAutoSms);
				break;
			}
			case TipMap.TIP_AUTO_SMS_INSERT:
			{
				massage = getResources().getString(R.string.tipAutoSmsInsert);
				break;
			}
			case TipMap.TIP_AUTO_SMS_ASSAY:
			{
				massage = getResources().getString(R.string.tipAutoSmsAssay);
				break;
			}
			case TipMap.TIP_AUTO_SMS_INFO:
			{
				massage = getResources().getString(R.string.tipAutoSmsInfo);
				break;
			}
			case TipMap.TIP_AUTO_PAST_SMS:
			{
				massage = getResources().getString(R.string.tipAutoSmsPast);
				break;
			}
			case TipMap.TIP_AUTO_PAST_SMS_LIST:
			{
				massage = getResources().getString(R.string.tipAutoSmsPastList);
				break;
			}
			case TipMap.TIP_AUTO_HALBU:
			{
				massage = getResources().getString(R.string.tipAutoHalbu);
				break;
			}
			case TipMap.TIP_AUTO_HALBU_INSERT:
			{
				massage = getResources().getString(R.string.tipAutoHalbuInsert);
				break;
			}
			case TipMap.TIP_AUTO_HALBU_INFO:
			{
				massage = getResources().getString(R.string.tipAutoHalbuInfo);
				break;
			}
			case TipMap.TIP_BUDGER_STATS:
			{
				massage = getResources().getString(R.string.tipBudgetStats);
				break;
			}
			case TipMap.TIP_BUDGER_OUT:
			{
				massage = getResources().getString(R.string.tipBudgetOut);
				break;
			}
			case TipMap.TIP_BUDGER_OUT_UPDATE:
			{
				massage = getResources().getString(R.string.tipBudgetOutUpdate);
				break;
			}
			case TipMap.TIP_BUDGER_IN:
			{
				massage = getResources().getString(R.string.tipBudgetIn);
				break;
			}
			case TipMap.TIP_BUDGER_IN_UPDATE:
			{
				massage = getResources().getString(R.string.tipBudgetInUpdate);
				break;
			}
			case TipMap.TIP_BUDGER_MOVE:
			{
				massage = getResources().getString(R.string.tipBudgetMove);
				break;
			}
			case TipMap.TIP_BUDGER_MOVE_UPDATE:
			{
				massage = getResources().getString(R.string.tipBudgetMoveUpdate);
				break;
			}
			case TipMap.TIP_STATS_OUT:
			{
				massage = getResources().getString(R.string.tipStatsOut);
				break;
			}
			case TipMap.TIP_STATS_IN:
			{
				massage = getResources().getString(R.string.tipStatsIn);
				break;
			}
			case TipMap.TIP_STATS_MOVE:
			{
				massage = getResources().getString(R.string.tipStatsMove);
				break;
			}
			case TipMap.TIP_STATS_LIST:
			{
				massage = getResources().getString(R.string.tipStatsList);
				break;
			}
			case TipMap.TIP_WIDGET:
			{
				massage = getResources().getString(R.string.tipWidget);
				break;
			}
			case TipMap.TIP_WIDGET_UPDATE:
			{
				massage = getResources().getString(R.string.tipWidgetUpdate);
				break;
			}
			case TipMap.TIP_MY_HOUSE:
			{
				massage = getResources().getString(R.string.tipHouseSetting);
				break;
			}
		}
		
		return massage;
	}

	@Override
	protected void tipButton()
	{
	}

}
